import request from '@/utils/request'
import { bb } from '@/utils/request';

//const bb = 'http://127.0.0.1:8080';
//const bb = 'http://182.92.190.174:8081';
//遍历游戏
export function getList(current,limit){
  return request({
    baseURL: bb,
    url: `/game/selectGame/${current}/${limit}`,
    method: 'post',
  })
}

export function addGame(gameName){
  return request({
    baseURL: bb,
    url: `/game/addGame/${gameName}`,
    method: 'get',
  })
}

export function updateGame(game){
  return request({
    baseURL: bb,
    url: `/game/updateGame`,
    method: 'put',
    data:game
  })
}

export function deleteGame(gameId){
  return request({
    baseURL: bb,
    url: `/game/deleteGame/${gameId}`,
    method: 'delete',
  })
}

export function deleteGameAll(all){
  return request({
    baseURL: bb,
    url: `/game/deleteGame`,
    method: 'delete',
    data:all
  })
}


export function getGame(){
  return request({
    baseURL: bb,
    url: `/game/deleteGame`,
    method: 'get',
  })
}
